package com.boss.controller;

import com.alibaba.fastjson.JSON;
import com.boss.entity.JobOffersSelectService;
import com.boss.service.JobOffersSelectServiceService;
import com.boss.util.TypeConversion;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RequestPart;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/jobOffersSelectServiceService")
public class JobOffersSelectServiceServiceController {
    @Autowired
    private JobOffersSelectServiceService jobOffersSelectServiceService;
    //获取所有的职位
@RequestMapping("/getAllJobOffersSelectServcie")
    public String getAllJobOffersSelectService(@RequestParam(value = "jobStatus",required = false)String jobStatus){
        List<JobOffersSelectService> list = jobOffersSelectServiceService.getAllJobOffersSelectService(TypeConversion.Objects(jobStatus));
        String json = JSON.toJSONString(list);
        System.out.println(json);
        return json;
    }
}
